package com.java1412.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author java1412
 * @since 2024-04-01 14:09:20
 */
// 作为feign的客户端,value的值是服务注册中心的应用名称
// fallback:指定使用哪个实现类作为兜底方案所在的类
@FeignClient(value = "SERVICE-HI", fallback = SchedualServiceHiHystric.class)
public interface SchedualServiceHi {
    @RequestMapping(value = "/hi")
    public String sayHiFromClientOne(
            @RequestParam(value = "name", required = false, defaultValue = "java1412") String name
    );
}
